Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: simplify blockexplorer link #638

Closed
wants to merge 9 commits into from
Closed

Conversation

dni
Copy link
Contributor

@dni dni commented Jul 15, 2024

working on integration a blockexplorer setting i found it very difficult to understand the BlockExplorerLink component, i would suggest of removing the general one on the Pay page and put it explicitly into each relevant swap status page. this removed the needs of the BlockExplorerLink component

it can be tested for each status page

Copy link

vercel bot commented Jul 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webapp ✅ Ready (Inspect) Visit Preview Aug 5, 2024 0:56am
webapp-mainnet ✅ Ready (Inspect) Visit Preview Aug 5, 2024 0:56am

Copy link
Member

@michael1011 michael1011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lockup.failed is missing link to the lockup transaction

image

src/status/SwapExpired.tsx Outdated Show resolved Hide resolved
@dni
Copy link
Contributor Author

dni commented Jul 23, 2024

lockup.failed is missing link to the lockup transaction

image

done

@dni dni requested a review from kilrau July 23, 2024 10:05
Copy link
Member

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. open claim tx for reverse and chain swap ✅
  2. open lockup tx for normal and chain swap ✅
  3. open lockup tx for lockup.failed
    image

src/status/InvoiceFailedToPay.tsx Show resolved Hide resolved
src/status/SwapExpired.tsx Outdated Show resolved Hide resolved
Comment on lines +63 to +71
<BlockExplorer
asset={
swap().claimTx ? swap().assetReceive : swap().assetSend
}
txId={swap().claimTx || swap().lockupTx}
address={
swap().claimAddress || (swap() as SubmarineSwap).address
}
/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes no sense either. Why would we ever want to show assetReceive after we broadcasted a claim?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my thinking was, when doing a reverse or chainswap and i successfully receive lbtc i want to open that claimTx on the success page

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I meant assetSend. Showing the send one makes no sense

Comment on lines 14 to 18
<BlockExplorer
asset={swap().assetSend}
txId={swapStatusTransaction()?.id}
typeLabel="lockup_tx"
/>
Copy link
Member

@michael1011 michael1011 Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we showing this in transaction.mempool but not for transaction.confirmed or invoice.pending?

src/status/TransactionMempool.tsx Outdated Show resolved Hide resolved
dni added 8 commits August 5, 2024 11:04
working on integration a blockexplorer setting i found it very difficult
to understand the BlockExplorerLink component, i would suggest of
removing the general one on the `Pay` page and put it explicitly into
each relevant swap status page. this removed the needs of the
`BlockExplorerLink` component

it can be tested for each status page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants